/*
 * @Descripttion:
 * @Author: Wang Dejiang(aei)
 * @Date: 2022-04-12 19:45:11
 * @LastEditors: Wang Dejiang(aei)
 * @LastEditTime: 2022-05-04 00:16:06
 */

import { defineStore } from 'pinia'

export const useStore = defineStore('main', {
  state: () => ({
    text: 'test',
    pageIndex: '',
    apiIndex: 'command',
    a: localStorage.getItem('a') ? localStorage.getItem('a') : '123',
  }),
  getters: {},
  actions: {
    setPageIndex(str: string) {
      this.pageIndex = str
    },
    setApiIndex(str: string) {
      this.apiIndex = str
    },
  },
})
